package com.cyx.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;

@Component
//@EnableConfigurationProperties(User.class)
@ConfigurationProperties(prefix = "user")
public class User {
    private String name;
    private String address;
    private Date birthday;
    private Integer age;
    private List<Object> courseList;
    private Dog dog;

    public Dog getDog() {
        return dog;
    }

    public void setDog(Dog dog) {
        this.dog = dog;
    }

    public List<Object> getCourseList() {
        return courseList;
    }

    public void setCourseList(List<Object> courseList) {
        this.courseList = courseList;
    }


    public User() {
    }

    public User(String name, String address, Date birthday, Integer age, List<Object> courseList, Dog dog) {
        this.name = name;
        this.address = address;
        this.birthday = birthday;
        this.age = age;
        this.courseList = courseList;
        this.dog = dog;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", address='" + address + '\'' +
                ", birthday=" + birthday +
                ", age=" + age +
                ", courseList=" + courseList +
                ", dog=" + dog +
                '}';
    }
}
